﻿function setMouseOver2(object, newClass) {
    oldClass = object.className;
    object.className = newClass; 
    if (newClass=='block-why-on'){                
        document.getElementById("block_technology").className='block-technology-services';
        document.getElementById("block_industries").className='block-industries';
        document.getElementById("block_joinus").className='block-join-us';
    }   
    else if (newClass=='block-technology-services-on'){
        document.getElementById("block_why").className='block-why';                
        document.getElementById("block_industries").className='block-industries';
        document.getElementById("block_joinus").className='block-join-us';
    }
    else if (newClass=='block-industries-on'){
        document.getElementById("block_why").className='block-why';
        document.getElementById("block_technology").className='block-technology-services';            
        document.getElementById("block_joinus").className='block-join-us';
    }
    else if (newClass=='block-join-us-on'){
        document.getElementById("block_why").className='block-why';
        document.getElementById("block_technology").className='block-technology-services';
        document.getElementById("block_industries").className='block-industries';
    }
    object.style.cursor='hand';            
}

function setMouseOut2(object, newClass) {    
    object.className = newClass;
    object.style.cursor='pointer';
} 
function keypressed(event) {
    if (event.keyCode == '13') {
        var q = document.getElementsByName('q')[0].value;
        var newWindow = window.open('Search.aspx?q=' + q, '_self');
    }
}
function showsearch() {
    var q = document.getElementsByName('q')[0].value;
    var newWindow = window.open('Search.aspx?q=' + q, '_self');
}

function fncLoaded()
{		   
    ShowDivById("master_main_page", true);
    ShowDivById("master_main_loading", false);
}

function ShowDivById(divId, visible) {
    var divObject = document.getElementById(divId);
    if (divObject!=null){
	    divObject.style.display = (visible) ? "block" : "none";
	    divObject.style.visibility = (visible) ? "visible" : "hidden";
    }
}